﻿Public Class Appointment

    Private _Subject As String
    Public Property Subject() As String
        Get
            Return _Subject
        End Get
        Set(ByVal value As String)
            _Subject = value
        End Set
    End Property

    Public ReadOnly Property DueStyle() As String
        Get
            Return If(Start > Now, "b", "s")
        End Get
    End Property

    Private _AllDaysEvent As Boolean
    Public Property AllDaysEvent() As Boolean
        Get
            Return _AllDaysEvent
        End Get
        Set(ByVal value As Boolean)
            _AllDaysEvent = value
        End Set
    End Property

    Private _Body As String
    Public Property Body() As String
        Get
            Return _Body
        End Get
        Set(ByVal value As String)
            _Body = value
        End Set
    End Property

    Private _BusyStatus As String
    Public Property BusyStatus() As String
        Get
            Return _BusyStatus
        End Get
        Set(ByVal value As String)
            _BusyStatus = value
        End Set
    End Property

    Private _Categories As String
    Public Property Categories() As String
        Get
            Return _Categories
        End Get
        Set(ByVal value As String)
            _Categories = value
        End Set
    End Property

    Private _Duration As TimeSpan
    Public Property Duration() As TimeSpan
        Get
            Return _Duration
        End Get
        Set(ByVal value As TimeSpan)
            _Duration = value
        End Set
    End Property

    Private _End As Date
    Public Property [End]() As Date
        Get
            Return _End
        End Get
        Set(ByVal value As Date)
            _End = value
        End Set
    End Property

    Private _ItemId As String
    Public Property ItemId() As String
        Get
            Return _ItemId
        End Get
        Set(ByVal value As String)
            _ItemId = value
        End Set
    End Property

    Private _Location As String
    Public Property Location() As String
        Get
            Return _Location
        End Get
        Set(ByVal value As String)
            _Location = value
        End Set
    End Property

    Private _Start As Date
    Public Property Start() As Date
        Get
            Return _Start
        End Get
        Set(ByVal value As Date)
            _Start = value
        End Set
    End Property

End Class

Public Class Appointments

    Private _Rows As List(Of Appointment)
    Public Property Rows() As List(Of Appointment)
        Get
            Return _Rows
        End Get
        Set(ByVal value As List(Of Appointment))
            _Rows = value
        End Set
    End Property

    Private _Success As Boolean = True
    Public Property Success() As Boolean
        Get
            Return _Success
        End Get
        Set(ByVal value As Boolean)
            _Success = value
        End Set
    End Property

    Public ReadOnly Property Results() As Long
        Get
            Return Me.Rows.Count
        End Get
    End Property
End Class
